if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SendNoticeQueueInsert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[SendNoticeQueueInsert]
GO

CREATE PROCEDURE dbo.[SendNoticeQueueInsert]
(
	@SiteUrl nvarchar(1000), 
	@NoticeID int,
	@PreservationCriteria int,
	@FromAddress nvarchar(500),
	@Created datetime,
	@ExtraCriteriaName nvarchar(500),
	@ExtraCriteriaValue nvarchar(500),
	@NewSiteUrl nvarchar(1000) = NULL,
	@NewSiteID uniqueidentifier = NULL 
)
AS
SET NOCOUNT ON

INSERT INTO SendNoticeQueue
(
	SiteUrl,
	NoticeID, 
	PreservationCriteria,
	FromAddress,
	Created,
	ExtraCriteriaName,
	ExtraCriteriaValue,
	NewSiteUrl,
	NewSiteID
) 
VALUES 
(
	@SiteUrl, 
	@NoticeID, 
	@PreservationCriteria,
	@FromAddress,
	@Created,
	@ExtraCriteriaName,
	@ExtraCriteriaValue,
	@NewSiteUrl,
	@NewSiteID
)
GO